package com.ruoyi.framework.web.service;

import com.ruoyi.project.wechatprogram.menu.domain.WxMenu;
import com.ruoyi.project.wechatprogram.menu.service.IWxMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * RuoYi首创 html调用 thymeleaf 实现参数管理
 * 
 * @author ruoyi
 */
@Service("menu")
public class MenuService
{
    @Autowired
    private IWxMenuService wxMenuService;

    /**
     * 根据键名查询餐品类目
     * 
     * @param menu 参数名称
     * @return 参数键值
     */
    public List<WxMenu> getMenu(WxMenu menu)
    {
        return wxMenuService.selectWxMenuList(menu);
    }

    /**
     * 根据键名查询餐品类目,查询当前类目没有选择的餐品
     *
     * @param categoryId 餐品类目id
     * @return 参数键值
     */
    public List<WxMenu> getMenu(Integer categoryId)
    {
        return wxMenuService.selectWxMenuListByCategoryId(categoryId);
    }

}
